module teapo.app.tests {
export class TestCase {
state = ko.observable(TestCase.State.NotStarted);
runtime = ko.observable<number>(null);
failure = ko.observable<Error>(null);
private _started = -1;
constructor(
public name,
private _test: Function) {
}
start() {
if (this.state() !== TestCase.State.NotStarted)
throw new Error('Test case already started (' + TestCase.State[this.state()] + ').');
this.state(TestCase.State.Running);
this.runtime(0);
this._started = Date.now();
try {}
catch (error) {
//}
}
}
export module TestCase {
export enum State {
NotStarted, Running, Succeeded, Failed}
}
}